package com.wejoy.video.middle.station.api.controller.dict;


import com.wejoy.video.middle.station.data.service.common.IDictService;
import com.wejoy.video.middle.station.data.vo.RespJSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 字典接口
 */
@RestController
@RequestMapping("/common/dict")
public class DictAction {
    @Autowired
    private IDictService dictService;

    /**
     * 统计枚举名称获得枚举的数据
     *
     * @param name
     * @return
     */
    @RequestMapping("/getDictData/{name}")
    public RespJSON getDictData(@PathVariable("name") String name) {
        return RespJSON.success(dictService.getDictData(name));
    }
}
